export const getUrlParam = (url) => {
    let paramObj = {}

    let paramIndex = url.indexOf('?')
    if (paramIndex > 0) {
        let paramData = url.substring(paramIndex + 1)
        paramData = paramData.split('&')

        paramData.forEach(item => {
            let tmpArray = item.split('=')
            paramObj[tmpArray[0]] = unescape(tmpArray[1])
        })
    }

    return paramObj
}
export function objKeySort(arys) {
    var newkey = Object.keys(arys).sort();
    var newObj = {}; //创建一个新的对象，用于存放排好序的键值对
    for (var i = 0; i < newkey.length; i++) {
        //遍历newkey数组
        newObj[newkey[i]] = arys[newkey[i]];
        //向新创建的对象中按照排好的顺序依次增加键值对
    }
    let resStr = "";
    for (const key in newObj) {
        if (newObj[key]) {
            resStr += key + newObj[key];
        }
    }

    return resStr;
};